﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing.Drawing2D;
using System.Drawing;
using System.Windows.Forms;


namespace Dreaming_of_Space_2
{
    public class Planet
    {
        public int planet_life = 100000;
        public int max_planet_life = 100000;
        public int pos_x = 355;
        public int pos_y = 285;
        public int R_orbit = 25;
        public bool Draw_Planet_life(PaintEventArgs e)
        {

            int life = (int)System.Math.Ceiling((double)50 * planet_life / max_planet_life);
            Pen myPen = new Pen(Color.LightGreen, 4);
            e.Graphics.DrawLine(myPen, pos_x - R_orbit, pos_y - R_orbit, pos_x - R_orbit + life, pos_y - R_orbit);

            return true;
        }

        
    }
}
